package com.woniu.service.impl;

import com.woniu.dao.MerchantMapper;
import com.woniu.dto.MerchantDTO;
import com.woniu.service.MerchantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class MerchantServiceImpl implements MerchantService {

    @Autowired
    private MerchantMapper merchantMapper;

    @Override
    public List<MerchantDTO> findByPage(Integer currentPage, Integer pageSize) {
        List<MerchantDTO> list=merchantMapper.findByPage(currentPage,pageSize);
        return list;
    }

    @Override
    public void editStatusById(Integer id, Date examineTime) {
        merchantMapper.editStatusById(id,examineTime);
    }

    @Override
    public List<MerchantDTO> select(String nickName, Integer status) {
        List<MerchantDTO> list=merchantMapper.select(nickName,status);
        return list;
    }

    @Override
    public void refuse(Integer id, Date refuseTime) {
        merchantMapper.refuse(id,refuseTime);

    }
}
